/****************************************************
 * Description: 数据字典类
 * Copyright:   Copyright (c) 2013
 * Company:     beiwaionline
 * @author      oldwolf
 * @version     1.0
 * @see
	HISTORY
	*  2014-01-14 oldwolf Create File
**************************************************/
package com.bfsuol.common;


/**
 * 数据字典编码规则：
 * 
 * 模块（2位） + 表序（3位） + 字段序号（2位） + 字典（2位）
 * 
 */
public class Constants {
	
	public static final String SESSION_LOGININFO_ORG_ID="SESSION_LOGININFO_ORG_ID";
	public static final String STU_MOREN_PASSWORD = "123456";//学生默认生成密码（密码重置时的默认密码）
	/** 是否:100000001=是 */
	public static final Integer GLOBAL_YESNO_YES = 100000001;
	/** 是否:100000002=否 */
	public static final Integer GLOBAL_YESNO_NO = 100000002;
	/** * 公共 -> 是否 100000001=是;100000002=否  */
	public static final Integer[] GLOBAL_YESNO = {GLOBAL_YESNO_YES,  GLOBAL_YESNO_NO};
	
	/** 性别:100000101=男 */
	public static final Integer USER_GENDER_MALE = 100000101;
	/** 性别:100000102=女 */
	public static final Integer USER_GENDER_FEMALE = 100000102;
	/** 性别:100000103=保密 */
	public static final Integer USER_GENDER_SECRET = 100000103;
	/** * User -> 性别 100000101=男;100000102=女;100000103=保密 */
	public static final Integer[] USER_GENDER = {USER_GENDER_MALE,  USER_GENDER_FEMALE };
	
	
	/** 用户类型:100000201=总部管理员 */
	public static final Integer USER_TYPE_ADMIN = 100000201;
	/** 用户类型:100000202=中心管理员 */
	public static final Integer USER_TYPE_MANAGER = 100000202;
	/** 用户类型:100000203=教师 */
	public static final Integer USER_TYPE_TUTOR = 100000203;
	/** 用户类型:100000204=学生 */
	public static final Integer USER_TYPE_LEARNER = 100000204;
	/** * User -> 用户类型 100000201=总部管理员;100000202=中心管理员;100000203=教师;100000204=学生*/
	public static final Integer[] USER_TYPE = { USER_TYPE_ADMIN, USER_TYPE_MANAGER, USER_TYPE_TUTOR,USER_TYPE_LEARNER  };
	/** * User -> 用户类型 100000201=总部管理员;100000202=中心管理员;100000203=教师;100000204=学生*/
	public static final Integer[] USER_TYPE3 = {  USER_TYPE_MANAGER, USER_TYPE_TUTOR,USER_TYPE_LEARNER  };
	/** * User -> 管理员用户类型 100000201=总部管理员;100000202=中心管理员*/
	public static final Integer[] ADMINTYPE = { USER_TYPE_ADMIN, USER_TYPE_MANAGER};
	/** 用户类型:100000205=教师和学生 */
	public static final Integer USER_TYPE_LEARNER_ANDTUTOR = 100000205;
	/** User -> 用户类型 100000203=教师;100000204=学生 ;100000205=教师和学生*/
	public static final Integer[] USER_TYPE2 = {USER_TYPE_TUTOR,USER_TYPE_LEARNER,USER_TYPE_LEARNER_ANDTUTOR};
	
	
	/** 有效状态:100000301=有效 */
	public static final Integer STATUS_VALID= 100000301;
	/** 有效状态:100000302=无效 */
	public static final Integer STATUS_INVALID= 100000302;
	/** *公共有效状态:100000301=有效 100000302=无效 */
	public static final Integer[] STATUS={ STATUS_VALID, STATUS_INVALID };
	
	
	/** 讨论组类型:100000501=默认讨论组 */
	public static final Integer TALK_GROUP_TYPE_DEFAULT = 100000501;
	/** 讨论组类型:100000502=教师创建讨论组 */
	public static final Integer TALK_GROUP_TYPE_TUTOR_CREAT= 100000502;
	/** *讨论组类型 */
	public static final Integer[] TALK_GROUP_TYPE={ TALK_GROUP_TYPE_DEFAULT, TALK_GROUP_TYPE_TUTOR_CREAT };
	
	
	/** MAJOR 英语专业*/
	public static final Integer MAJOR_EGLISH= 100010501;
	/** MAJOR 工商管理*/
	public static final Integer MAJOR_BUSINESS_ADMINISTRATOR = 100010502;
	/** MAJOR 会计学*/
	public static final Integer MAJOR_ACCOUNTING = 100010503;
	/** MAJOR 国际经济与贸易*/
	public static final Integer MAJOR_GUOJI_JINGJI_MAOYI = 100010507;
	/** MAJOR 金融学*/
	public static final Integer MAJOR_FINANCE_BANKING = 100010504;
	/** MAJOR 电子商务*/
	public static final Integer MAJOR_E_COMMERCE = 100010505;
	/** MAJOR 信息管理与信息技术*/
	public static final Integer MAJOR_INFORMATION_MANAGEMENT_TECHNOLOGY = 100010506;
	/** MAJOR 专业*/
	public static final Integer[] MAJOR = {
				MAJOR_EGLISH,
				MAJOR_BUSINESS_ADMINISTRATOR,
				MAJOR_ACCOUNTING,
				MAJOR_GUOJI_JINGJI_MAOYI,
				MAJOR_FINANCE_BANKING,
				MAJOR_E_COMMERCE,
				MAJOR_INFORMATION_MANAGEMENT_TECHNOLOGY
				};
	/**MAJOR_BUS 经管专业 */
	public static final Integer[] MAJOR_BUS = {
		MAJOR_BUSINESS_ADMINISTRATOR,
		MAJOR_ACCOUNTING,
		MAJOR_GUOJI_JINGJI_MAOYI,
		MAJOR_FINANCE_BANKING,
		MAJOR_E_COMMERCE,
		MAJOR_INFORMATION_MANAGEMENT_TECHNOLOGY
	};
	
	/** 省  北京*/
	public static final Integer PROVENCE_BJ= 100010601;
	/** 省  天津*/
	public static final Integer PROVENCE_TJ= 100010602;
	/** 省  上海*/
	public static final Integer PROVENCE_SH= 100010603;
	/** 省  重庆*/
	public static final Integer PROVENCE_CQ= 100010604;
	/** 省  河北*/
	public static final Integer PROVENCE_HB= 100010605;
	/** 省  河南*/
	public static final Integer PROVENCE_HN= 100010606;
	/** 省  云南*/
	public static final Integer PROVENCE_YN= 100010607;
	/** 省  辽宁*/
	public static final Integer PROVENCE_LN= 100010608;
	/** 省  黑龙江*/
	public static final Integer PROVENCE_HLJ= 100010609;
	/** 省  湖南*/
	public static final Integer PROVENCE_HUNAN= 100010610;
	/** 省  安徽*/
	public static final Integer PROVENCE_AH= 100010611;
	/** 省  山东*/
	public static final Integer PROVENCE_SD= 100010612;
	/** 省  新疆*/
	public static final Integer PROVENCE_XJ= 100010613;
	/** 省  江苏*/
	public static final Integer PROVENCE_JS= 100010614;
	/** 省  浙江*/
	public static final Integer PROVENCE_ZJ= 100010615;
	/** 省  江西*/
	public static final Integer PROVENCE_JX= 100010616;
	/** 省  湖北*/
	public static final Integer PROVENCE_HUBEI= 100010617;
	/** 省  广西*/
	public static final Integer PROVENCE_GX= 100010618;
	/** 省  甘肃*/
	public static final Integer PROVENCE_GS= 100010619;
	/** 省  山西*/
	public static final Integer PROVENCE_SHANXI= 100010620;
	/** 省  内蒙古*/
	public static final Integer PROVENCE_NMG= 100010621;
	/** 省  陕西*/
	public static final Integer PROVENCE_SX= 100010622;
	/** 省  吉林*/
	public static final Integer PROVENCE_JL= 100010623;
	/** 省  福建*/
	public static final Integer PROVENCE_FJ= 100010624;
	/** 省  贵州*/
	public static final Integer PROVENCE_GZ= 100010625;
	/** 省  广东*/
	public static final Integer PROVENCE_GD= 100010626;
	/** 省  青海*/
	public static final Integer PROVENCE_QH= 100010627;
	/** 省  西藏*/
	public static final Integer PROVENCE_XZ= 100010628;
	/** 省  四川*/
	public static final Integer PROVENCE_SC= 100010629;
	/** 省  宁夏*/
	public static final Integer PROVENCE_NX= 100010630;
	/** 省  海南*/
	public static final Integer PROVENCE_HAINAN= 100010631;
	/** 省  台湾*/
	public static final Integer PROVENCE_TW= 100010632;
	/** 省  香港*/
	public static final Integer PROVENCE_XG= 100010633;
	/** 省  澳门*/
	public static final Integer PROVENCE_AM= 100010634;
	public static final Integer[] PROVENCE= {
		PROVENCE_BJ,
		PROVENCE_SH,
		PROVENCE_TJ,
		PROVENCE_CQ,
		PROVENCE_AH,
		PROVENCE_FJ,
		PROVENCE_GD,
		PROVENCE_GS,
		PROVENCE_GX,
		PROVENCE_GZ,
		PROVENCE_HB,
		PROVENCE_HN,
		PROVENCE_HLJ,
		PROVENCE_HUBEI,
		PROVENCE_HUNAN,
		PROVENCE_LN,
		PROVENCE_JL,
		PROVENCE_JS,
		PROVENCE_JX,
		PROVENCE_NMG,
		PROVENCE_NX,
		PROVENCE_QH,
		PROVENCE_SC,
		PROVENCE_SX,
		PROVENCE_SD,
		PROVENCE_SHANXI,
		PROVENCE_XJ,
		PROVENCE_XZ,
		PROVENCE_YN,
		PROVENCE_ZJ,
		PROVENCE_HAINAN,
		PROVENCE_XG,
		PROVENCE_AM,
		PROVENCE_TW
	};
	
	/**program 专升本*/
	public static final Integer PROGRAM_ZHUAN_SHENG_BEN  = 100010701 ;
	/**program 高起本*/
	public static final Integer PROGRAM_GAO_QI_BEN  = 100010702 ;
	/**program 高起专*/
	public static final Integer PROGRAM_GAO_QI_ZHUAN  = 100010703 ;
	/**program 专本连读(集中学习制)*/
	public static final Integer PROGRAM_ZHUAN_BEN_TOGETHER  = 100010704 ;
	/**program 专升本(集中学习制)*/
	public static final Integer PROGRAM_ZHUAN_SHENG_BEN_TOGETHER  = 100010705;
	/**program 在校大学生二学历*/
	public static final Integer PROGRAM_COLLEGE_STUDENT_SECOND_DEGREE  = 100010706;
	/**program 专升本(内部高起专续读)*/
	public static final Integer PROGRAM_ZHUAN_SHENG_BEN_INNER_CONTINUE  = 100010707;
	/**program 专接本*/
	public static final Integer PROGRAM_ZHUAN_JIE_BEN  = 100010708;
	/**program 在校大学生英语本科*/
	//	public static final Integer PROGRAM_COLLEGE_STUDENT_ENGLISH_BACHELOR  = 100010709;
	/** 层次*/
	public static final Integer[] PROGRAM_ENR = {
		PROGRAM_ZHUAN_SHENG_BEN,
		PROGRAM_GAO_QI_BEN,
		PROGRAM_GAO_QI_ZHUAN,
		PROGRAM_ZHUAN_JIE_BEN
		};
	/** 层次*/
	public static final Integer[] PROGRAM_REGISTER_ENR = {
		PROGRAM_ZHUAN_SHENG_BEN,
		PROGRAM_GAO_QI_BEN,
		PROGRAM_GAO_QI_ZHUAN
	};
	/** 层次*/
	public static final Integer[] PROGRAM = {
		PROGRAM_ZHUAN_SHENG_BEN,
		PROGRAM_GAO_QI_BEN,
		PROGRAM_GAO_QI_ZHUAN,
		PROGRAM_ZHUAN_BEN_TOGETHER,
		PROGRAM_ZHUAN_SHENG_BEN_TOGETHER,
		PROGRAM_COLLEGE_STUDENT_SECOND_DEGREE,
		PROGRAM_ZHUAN_SHENG_BEN_INNER_CONTINUE,
		PROGRAM_ZHUAN_JIE_BEN
		//PROGRAM_COLLEGE_STUDENT_ENGLISH_BACHELOR
	};
	/**证件类型*/
	/**身份证*/
	public static final Integer CERTIFICATE_TYPE_IDENTITY_CARD  = 100010801;
	/**警官证*/
	public static final Integer CERTIFICATE_TYPE_POLICE_CARD  = 100010802;
	/**军官证*/
	public static final Integer CERTIFICATE_TYPE_SOLDIER_CARD  = 100010803;
	/**港澳台胞证*/
	public static final Integer CERTIFICATE_TYPE_GATB_CARD  = 100010804;
	/**护照*/
	public static final Integer CERTIFICATE_TYPE_PASSPORT_CARD = 100010805;
	/**证件类型*/
	public static final Integer[] CERTIFICATE_TYPE={
		CERTIFICATE_TYPE_IDENTITY_CARD,
		CERTIFICATE_TYPE_SOLDIER_CARD,
		CERTIFICATE_TYPE_PASSPORT_CARD,
		CERTIFICATE_TYPE_GATB_CARD
	};
	/**图片类型*/
	/**个人免冠照片*/
	public static final Integer PICTURE_TYPE_MGZP=100020101;
	/**身份证图片*/
	public static final Integer PICTURE_TYPE_SFZ=100020102;
	/**学信网图片*/
	public static final Integer PICTURE_TYPE_XX=100020103;
	/**毕业证*/
	public static final Integer PICTURE_TYPE_BY=100020104;
	/**其他*/
	public static final Integer PICTURE_TYPE_OTHER1=100020105;
	public static final Integer PICTURE_TYPE_OTHER2=100020106;
	public static final Integer PICTURE_TYPE_OTHER3=100020107;
	/**免试证书*/
	public static final Integer PICTURE_TYPE_MS=100020108;
	
	/**
	 * 通过专业得到报名号的部分组成
	 */
	public static String getPartCodeByMajor(Integer major){
		
		if(MAJOR_EGLISH.intValue()==major.intValue()){
			return "0";
		}else if(MAJOR_BUSINESS_ADMINISTRATOR.intValue()==major.intValue()){
			return "1";
		}else if(MAJOR_ACCOUNTING.intValue()==major.intValue()){
			return "2";
		}else if(MAJOR_GUOJI_JINGJI_MAOYI.intValue()==major.intValue()){
			return "3";
		}else if(MAJOR_FINANCE_BANKING.intValue()==major.intValue()){
			return "4";
		}else if(MAJOR_E_COMMERCE.intValue()==major.intValue()){
			return "5";
		}else if(MAJOR_INFORMATION_MANAGEMENT_TECHNOLOGY.intValue()==major.intValue()){
			return "6";
		}else{
		return "";
		}
	}
	/**
	 * 通过层次得到报名号的部分组成
	 */
	public static String getPartCodeByProgram(Integer program){
		if(PROGRAM_ZHUAN_SHENG_BEN.intValue()==program.intValue()){
			return "B";
		}else if(PROGRAM_GAO_QI_BEN.intValue()==program.intValue()){
			return "C";
		}else if(PROGRAM_GAO_QI_ZHUAN.intValue()==program.intValue()){
			return "A";
		}else if(PROGRAM_ZHUAN_JIE_BEN.intValue()==program.intValue()){
			return "I";
		}else{
		return "";
		}
	}
	
	/**专业方向   无方向*/
	public static final Integer ZYFX_1=100030101;
	/**专业方向  英语教育*/
	public static final Integer ZYFX_2=100030102;
	/**专业方向  商务方向*/
	public static final Integer ZYFX_3=100030103;
	/**专业方向  英语翻译*/
	public static final Integer ZYFX_4=100030104;
	/**专业方向  财经英语*/
	public static final Integer ZYFX_5=100030105;
	/**专业方向  法律英语*/
	public static final Integer ZYFX_6=100030106;
	/**专业方向  包含无方向*/
	public static final Integer[] ZYFX_ALL = {
		ZYFX_1,
		ZYFX_2,
		ZYFX_3,
		ZYFX_4,
		ZYFX_5,
		ZYFX_6,
	};
	/**专业方向  不包含无方向*/
	public static final Integer[] ZYFX_EN = {
		ZYFX_2,
		ZYFX_3,
		ZYFX_4,
		ZYFX_5,
		ZYFX_6,
	};
	public static final String OPKEY = "bjwgydx";
}
